<header>
    最大公因式
</header>
<p>
    <span class="title">定义</span>
    设f(x),g(x)是P[x]中两个多项式。P[x]中多项式d(x)称为f(x),g(x)的一个最大公因式，如果它满足下面两个条件：
</p>
<ol>
    <li>
        d(x)是f(x),g(x)的公因式；
    </li>
    <li>
        f(x),g(x)的公因式全是d(x)的因式。
    </li>
</ol>
<h2>
    如何求解？
</h2>
<p>
    在介绍具体求法前，我们先看一个引理。
</p>
<p>
    <span class="title">引理</span>
    如果有等式
    <span class="oneline">
        f(x) = q(x)g(x) + r(x)
    </span>
    成立，那么f(x),g(x)和g(x),r(x)有相同的公因式。
</p>
<h3>
    辗转相除法
</h3>
<p>
    比如我们有两个多项式
    <span class="oneline">
        f(x) = x<sup>4</sup> + 3x<sup>3</sup> - x<sup>2</sup> - 4x - 3
        <br />
        g(x) = 3x<sup>3</sup> + 10x<sup>2</sup> + 2x -3
    </span>
    需要求解它们的最大公因式。
</p>
<p>
    那么我们可以如此下去：
</p>
<p>
    用f(x)除以g(x)得到
    <span class="oneline">
        <code>
            ["join",
                "f(x) = ",
                ["bracket",["join",["division","1","3"],"x - ",["division","1","9"]],"small"],
                "g(x) + ",
                ["bracket",
                    ["join","-",["division","5","9"],["rightTop","x","2"]," - ",["division","25","9"],"x - ",["division","10","3"]]
                ,"small"]
            ]
        </code>
    </span>
    由此，f(x),g(x)和g(x),
    <code>
        ["join","-",["division","5","9"],["rightTop","x","2"]," - ",["division","25","9"],"x - ",["division","10","3"]]
    </code>
    有相同的公因式，进而：
    <span class="oneline">
        <code>
            ["join",
                "g(x) = ", 
                ["bracket",["join","-",["division","27","5"],"x + 9"],"small"],
                ["bracket",
                    ["join","-",["division","5","9"],["rightTop","x","2"]," - ",["division","25","9"],"x - ",["division","10","3"]]
                ,"small"],
                " + (9x + 27)"
            ]
        </code>
    </span>
    继续：
    <span class="oneline">
        <code>
            ["join",
                "-",["division","5","9"],["rightTop","x","2"]," - ",["division","25","9"],"x - ",["division","10","3"],
                " = ",
                ["bracket",
                    ["join"," - ",["division","5","81"]," - ",["division","10","81"]]
                    ,"small"],
                "(9x + 27)"
            ]
        </code>
    </span>
    到此为止我们可以知道(9x + 27),1和f(x),g(x)有相同的公因式，故最终得到：(f(x),g(x)) = x+3
</p>
<p class="warn">
    温馨提示：(f(x),g(x))表示首项系数是1的那个最大公因式。
</p>
<h2>
    相关定理
</h2>
<p>
    <span class="title">定理</span>
    对于P[x]中任意两个多项式f(x),g(x)，在P[x]中存在一个最大公因式d(x)，且d(x)可以表成f(x),g(x)的一个组合，即有P[x]中多项式u(x),v(x)使：
    <span class="oneline">
        d(x) = u(x)f(x) +v(x)g(x)
    </span>
</p>